﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using smsg_DAL;
using MvcContrib.Pagination;

namespace smsgs_MVC3.Areas.Messages.Models
{
    public class MessagesView
    {
        public IUserString User;
        public IEnumerable<KVP.KVPNew<long, string>> UnreadMessages;
        public IPagination<KVP.KVPNew<long, string>> ReadMessages;
        public MessagesView(IUserString user)
        {
            User = user;
        }
        public void Load(int PageIndex, int PageSize, string OrderBy)
        {
            UnreadMessages = User.RetrieveMessagesUnreadSummary(false);
            ReadMessages = User.RetrieveMessageReceived_Paginatings(OrderBy, PageIndex, PageSize, null);

        }
    }
}